<?php

namespace App\Http\Controllers\Page;

use App\Http\Controllers\Controller;

class UserController extends Controller
{
    /**
     * @function 会员中心
     *
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function usercenter()
    {
        return view('user.usercenter');
    }

    /**
     * @function 手机绑定
     *
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public function manage()
    {
        return view('user.manage');
    }

    public function mobile_tips()
    {
        return view('user.mobile_tips');
    }

    public function qrcode()
    {
        return view('user.qrcode');
    }
    
    public function orderlist()
    {
        return view('user.orderlist');
    }

    public function orderdetail()
    {
        return view('user.orderdetail');
    }
    
    public function coin_jb()
    {
        return view('user.coin_jb');
    }

    public function coin_zs()
    {
        return view('user.coin_zs');
    }
    
    public function coupon()
    {
        return view('user.coupon');
    }
    
    public function fan()
    {
        $data = [];

        $data['fans_0'] = auth()->user()->fans()->count();
        $data['fans_1'] = auth()->user()->fans()->whereRaw('status&7=7')->count();

        return view('user.fanlist', $data);
    }
}